<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       .mask{
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom:0;
            z-index: 99999;

            background-color: rgba(0, 0, 0, 0.6);
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .content{
            width: 200px;
            height: 200px;
            background-color: white;
        }
    </style>
</head>
<body>
    <div class="app">
        <button @click='isShow=true'>按一下</button>
        <div class="mask" v-show='isShow' @click.self='isShow=false'>
            <div class="content" ></div>
        </div>
    </div>
</body>
<script src="./vue.js"></script>
<script>
const vm=new Vue({
    el:'.app',
    data:{
        isShow:false
    }
})
</script>
</html>